package com.test.domain.fruit.service.fruit.differentBuy;

import com.test.domain.fruit.service.fruit.FruitBuyStrategy;

public class DifferentBuy {

    private FruitBuyStrategy fruitBuyStrategy;

    public void setFruitStrategy(FruitBuyStrategy fruitBuyStrategy) {
        this.fruitBuyStrategy = fruitBuyStrategy;
    }

    public double calculateTotalPrice(int weight) {
        return fruitBuyStrategy.calculatePrice(weight);
    }

    public double calcuateTotalPriceByDiscout(int weight,double discout){
        return fruitBuyStrategy.calculatePriceByDiscout(weight,discout);
    }
}
